{#include file="admin_header.htm"#}
<script src="http://api.map.baidu.com/api?key={#$config.map_key#}&v=1.0&services=true" type="text/javascript"></script>
<div class="admin_main_nr_dbox">
  <form action="admin_settings.php?act=site_setsave" method="post"  name="form1" id="form1">
    <table width="700" border="0" cellspacing="0" cellpadding="5" style="border-bottom:1px #CCCCCC solid; margin-bottom:8px;">
      <tr>
        <td height="25" style="font-size:14px;" class="link_lan">电子地图设置 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#666666; font-size:12px;">(电子地图API的服务是由<a href="http://openapi.baidu.com/map/index.html" target="_blank">百度</a>提供，任何非盈利性网站均可使用。请参阅<a href="http://openapi.baidu.com/map/terms.html" target="_blank">使用条款</a>获得详细信息。)</span></td>
      </tr>
    </table>

    <table width="700" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td valign="top" style="border-bottom:1px #CCCCCC  dashed"><table width="100%" border="0" cellpadding="1" cellspacing="5"  class="link_lan" style=" margin-bottom:3px;">
        <tr>
          <td width="115" align="right">电子地图密匙：</td>
          <td width="220" height="25"><input name="map_key" type="text"  class="article_text_f" id="map_key" value="{#$config.map_key#}" maxlength="150"  style="width:220px;"/>
            <a href="http://openapi.baidu.com/map/signup.html" target="_blank"></a> </td>
          <td><a href="http://openapi.baidu.com/map/signup.html" target="_blank">免费申请密匙</a></td>
        </tr>
        <tr>
          <td align="right">默认中心点X坐标：</td>
          <td height="25"><span id="map_center_x_text" style="color:#009900">{#$config.map_center_x#}</span></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="right">默认中心点Y坐标：</td>
          <td height="25"> <span id="map_center_y_text" style="color:#009900">{#$config.map_center_y#}</span></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="right">默认缩放级别：</td>
          <td height="25"><span id="map_zoom_text" style="color:#009900">{#$config.map_zoom#}</span></td>
          <td><input name="map_center_x" type="hidden" value="{#$config.map_center_x#}"  id="map_center_x"/>
            <input name="map_center_y" type="hidden" value="{#$config.map_center_y#}"  id="map_center_y"/>
            <input name="map_zoom" type="hidden" value="{#$config.map_zoom#}" id="map_zoom" />
            <input name="submit" type="submit" class="Qishi_submit_a" onmouseover="this.className='Qishi_submit_b'"  onmouseout="this.className='Qishi_submit_a'" value="保存修改"/></td>
        </tr>
        
      </table></td>
      </tr>
    <tr>
      <td valign="top">
	  <div style="width:600px;height:400px;" id="container"></div></td>
      </tr>
  </table>
  </form>
</div>
<script type="text/javascript">
var map = new BMap.Map("container");
map.centerAndZoom(new BMap.Point({#$config.map_center_x#}, {#$config.map_center_y#}), {#$config.map_zoom#});
map.addControl(new BMap.NavigationControl());
map.enableScrollWheelZoom();
map.addEventListener("dragend", function(){   
var center = map.getCenter();   
//document.getElementById("info").innerHTML = center.lng + ", " + center.lat;
document.getElementById("map_center_x").value=center.lng; 
document.getElementById("map_center_y").value= center.lat; 
document.getElementById("map_zoom").value=map.getZoom();
//设置文本值
document.getElementById("map_center_x_text").innerHTML = center.lng; 
document.getElementById("map_center_y_text").innerHTML = center.lat; 
document.getElementById("map_zoom_text").innerHTML = map.getZoom(); 
});   
</script>
{#include file="admin_footer.htm"#}
</body>
</html>